Skip to content

Conversation

@abdoshbr3322
Copy link

Fixes: #3601

Now it behaves normally:

show_solved_issue.mp4

@timon-schelling
Copy link
Member

!build

@Keavon
Copy link
Member

Keavon commented Jan 8, 2026

querySelector for classes is not allowed, only for data attributes.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

📦 Build Complete for 109055b
https://6d980ceb.graphite.pages.dev

@abdoshbr3322
Copy link
Author

I removed the classes from the querySelector and replaced it with a data attribute specific to floating menus

@timon-schelling
Copy link
Member

!build

@github-actions
Copy link

📦 Build Complete for a6b178e
https://07eb2866.graphite.pages.dev

@timon-schelling
Copy link
Member

!build

@github-actions
Copy link

📦 Build Complete for 07d6a0d
https://20c84520.graphite.pages.dev

Copy link
Member

@timon-schelling timon-schelling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I would say we should merge this, having keyboard event listeners scattered in frontend code needs to be cleaned up at some point, but this is not much of a maintenance burden on its own and a good UX improvement.

// Add an event to handle enter press on all focusable fields(inputs) inside the popup
const floatingMenu = (self?.div?.()?.querySelector("[data-floating-menu-content]") || undefined) as HTMLDivElement | undefined;
floatingMenu?.addEventListener("keydown", function (event) {
if (event.key == "Enter") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT : maybe use === , instead of == , for string comparisons

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look closely at these files

MenuList.svelte:68-75
ColorPicker.svelte:408-410
ScrollbarInput.svelte:201-207

we always have a onDestroy after an onMount , not related to the changes from this PR , but would probably be a good idea to cleanup this stale event handler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enter fails to confirm in the New Document dialog after editing values

4 participants